<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Hardware Abstraction Layer (HAL)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="logo.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Hardware Abstraction Layer (HAL)</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__group__hal__impl__dac.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle"><div class="title">DAC (Digital to Analog Converter)<div class="ingroups"><a class="el" href="group__group__hal__impl.html">CAT1 Implementation Specific</a></div></div></div>
</div><!--header-->
<div class="contents">
<h1><a class="anchor" id="group_hal_impl_dac_power"></a>
Power Level Mapping</h1>
<p >The following table shows how the HAL-defined power levels map to the hardware-specific power levels when cyhal_dac uses output pin buffered mode (with opamp). Unbuffered mode only supports ON and OFF. </p><table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">HAL Power Level   </th><th class="markdownTableHeadNone">Opamp Power Level    </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><a class="el" href="group__group__hal__general__types.html#gga246fde0e79029f514ce3846b31e366d7a4d8ce140c28177e31de20cf8da8e2a99">CYHAL_POWER_LEVEL_HIGH</a>   </td><td class="markdownTableBodyNone">CY_CTB_POWER_HIGH    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><a class="el" href="group__group__hal__general__types.html#gga246fde0e79029f514ce3846b31e366d7ae189a666d589f8acf4c64142365def61">CYHAL_POWER_LEVEL_MEDIUM</a>   </td><td class="markdownTableBodyNone">CY_CTB_POWER_MEDIUM    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><a class="el" href="group__group__hal__general__types.html#gga246fde0e79029f514ce3846b31e366d7ae06723d07ff431a2f427d95ac61e2afb">CYHAL_POWER_LEVEL_LOW</a>   </td><td class="markdownTableBodyNone">CY_CTB_POWER_LOW    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><a class="el" href="group__group__hal__general__types.html#gga246fde0e79029f514ce3846b31e366d7a6f0f4df45e9cac012a2c8e5ba736241b">CYHAL_POWER_LEVEL_DEFAULT</a>   </td><td class="markdownTableBodyNone">CY_CTB_POWER_MEDIUM   </td></tr>
</table>
<p >cyhal_dac automatically choose between buffered and unbuffered mode by selecting pin. Unbuffered mode - dac pin, buffered - opamp pin. Buffered mode take care of reserving and configuring the opamp (OA0). If AREF voltage reference source is selected cyhal_dac takes care of reserving and configuring the opamp (OA1). By default cyhal_dac use VDDA voltage reference source. Use <a class="el" href="group__group__hal__dac.html#ga0fd4a8c9b2b5e3b712904d3e63ed8a41">cyhal_dac_set_reference()</a> to change between <a class="el" href="group__group__hal__dac.html#ggab8bd602f1b7d91eacd4126873148e5a3aa38d2cb249af9c70780d9b6aaa225e24">CYHAL_DAC_REF_VDDA</a> and <a class="el" href="group__group__hal__dac.html#ggab8bd602f1b7d91eacd4126873148e5a3af87f660f3058a173c6fbdeb24528e46f">CYHAL_DAC_REF_VREF</a> voltage reference sources.</p>
<dl class="section note"><dt>Note</dt><dd>When initializing the DAC via <a class="el" href="group__group__hal__dac.html#ga3909980f08a38f08035617bd38c6e918">cyhal_dac_init_cfg</a>, if opamps are required (either for buffered output or for buffering the AREF output when <a class="el" href="group__group__hal__dac.html#ggab8bd602f1b7d91eacd4126873148e5a3af87f660f3058a173c6fbdeb24528e46f">CYHAL_DAC_REF_VREF</a> is used) then they must be separately configured via <a class="el" href="group__group__hal__opamp.html#ga52cc0341b0cf6d3fb9f1cb7c2a46fbed">cyhal_opamp_init_cfg</a> before the DAC is initialized. However, once the DAC is initialized, the <a class="el" href="group__group__hal__dac.html#ga7a08830e80bd91017013c5f7cf306f0d">cyhal_dac_set_power</a> function will update the power mode for the opamp(s) in the same manner that it does for DAC instances initialized via <a class="el" href="group__group__hal__dac.html#gaa33e893eccc66deff01287434a847687">cyhal_dac_init</a>. </dd>
<dd>
When the DAC has been initialized via <a class="el" href="group__group__hal__dac.html#ga3909980f08a38f08035617bd38c6e918">cyhal_dac_init_cfg</a>, the <a class="el" href="group__group__hal__dac.html#ga0fd4a8c9b2b5e3b712904d3e63ed8a41">cyhal_dac_set_reference</a> function is not supported and will return <a class="el" href="group__group__hal__results__dac.html#gadeccf1be8b304e10e96a0539528de57a">CYHAL_DAC_RSLT_INVALID_CONFIGURATOR</a>. This is because the <a class="el" href="group__group__hal__dac.html#ga0fd4a8c9b2b5e3b712904d3e63ed8a41">cyhal_dac_set_reference</a> function needs to manipulate the configuration and routing for OA1, and in this scenario that configuration and routing is owned by the configurator. </dd></dl>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>Hardware Abstraction Layer (HAL)</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
